import Layout from "@/layout";
import levels from "@/views/levels";

const globalRouter = {
  path: "/global/menu",
  component: Layout,
  redirect: "noRedirect",
  name: "global",
  alwaysShow: true,
  meta: {
    title: "配置管理",
    abbre: "配置",
    icon: "left_menu_global",
    navigation: "/global",
    id: "407"
  },
  children: [
    {
      path: "/global/menu",
      component: () => import("@/views/global/menuConfig"),
      name: "global_menu_config",
      hidden: false,
      meta: {
        title: "菜单管理",
        noCache: true,
        navigation: "/global/menu",
        icon: "menu_big_data"
      }
    },
    {
      path: "/global/menuconfigdetail",
      component: () => import("@/views/global/menuConfigDetail"),
      name: "global_menu_detail",
      hidden: true,
      meta: {
        title: "菜单设置",
        bread: "菜单管理,菜单设置",
        noCache: true,
        navigation: "/global/menu",
        icon: "menu_big_data"
      }
    },
    {
      path: "/global/admin",
      component: () => import("@/views/global/globalAdmin"),
      name: "global_Admin",
      hidden: false,
      meta: {
        title: "管理员",
        noCache: true,
        navigation: "/global/admin",
        icon: "menu_big_data"
      }
    },
    {
      path: "/global/role",
      component: () => import("@/views/global/globalRole"),
      name: "global_role",
      hidden: false,
      meta: {
        title: "角色管理",
        noCache: false,
        navigation: "/global/role",
        icon: "menu_big_data"
      }
    },
    {
      path: "/global/grant/:id",
      component: () => import("@/views/global/globalGrant"),
      name: "global_grant",
      hidden: true,
      meta: {
        title: "授权",
        bread: "角色管理,授权",
        noCache: true,
        navigation: "/global/role",
        icon: "menu_big_data"
      }
    },
    {
      path: "/global/operation",
      component: () => import("@/views/global/globalOperation"),
      name: "global_operation",
      hidden: false,
      meta: {
        title: "操作日志",
        noCache: true,
        navigation: "/global/operation",
        icon: "menu_big_data"
      }
    },
    {
      path: "/global/setting",
      component: () => import("@/views/global/globalSetting"),
      name: "global_setting",
      hidden: false,
      meta: {
        title: "系统配置",
        noCache: true,
        navigation: "/global/setting",
        icon: "menu_big_data"
      }
    }

    // {
    //     path: '/global/system/config',
    //     component: levels,
    //     name: 'global_System',
    //     hidden: false,
    //     meta: { title: '系统配置', noCache: true, navigation: '/global/system/config', icon: 'menu_big_data' },
    //     children: [{
    //         path: '/global/system/config',
    //         component: () =>
    //             import('@/views/global/globalSystem_config'),
    //         name: '/global_system_config',
    //         hidden: true,
    //         meta: { title: '公司信息', noCache: true, navigation: '/global/system/config', icon: 'menu_big_data' },

    //     }, {
    //         path: '/global/system/modules',
    //         component: () =>
    //             import('@/views/global/globalSystem_modules'),
    //         name: 'global_system_modules',
    //         hidden: true,
    //         meta: { title: '模块配置', noCache: true, navigation: '/global/system/config', icon: 'menu_big_data' }
    //     }]
    // },

    // {
    //     path: '/global/delivery',
    //     component: () =>
    //         import('@/views/global/globalDelivery'),
    //     name: 'global_delivery',
    //     hidden: false,
    //     meta: { title: '配送时间', noCache: true, navigation: '/global/delivery', icon: 'menu_big_data' }
    // }
  ]
};

export default globalRouter;
